//浦东方向
var city1 = ["八佰伴","北蔡","碧云","曹路","川沙","东昌站地铁","东方路地铁","东明路","高行","高桥","花木","金杨新村","金桥","陆家嘴","六里","联洋","梅园","南码头","浦东外环","上钢新村","上南新村","三林","世纪公园","世博滨江","塘桥","唐镇","潍坊","外高桥","源深竹园","杨东","洋泾","周家渡","张江","其他"]; 
//闵行方向
var city2 = ["漕宝路","春申","古美罗阳","华漕","航华","虹桥","金虹桥","静安新城","江川路","龙柏金汇","老闵行","梅陇","马桥","浦江","七宝","吴泾","莘庄","颛桥","其他"]; 
//徐汇方向
var city3 = ["漕宝路地铁","漕河泾","长桥","复兴中路","枫林路","淮海西路","湖南路","华东理工","华泾","衡山路","交大","康健","龙华","凌云路","上师大","上海南站","田林","万体馆","徐家汇","斜土路","肇嘉浜路","植物园","其他"]; 
//长宁方向
var city4 = ["北新泾","程家桥","动物园","古北","虹桥","江苏路地铁","上海影城","天山路","新华路","仙霞新村","镇宁路","中山公园","周家桥","其他"]; 
//普陀方向
var city5 = ["长寿路","曹杨新村","长风新村","长征","光新","甘泉路","华师大","金沙江路","石泉路","桃浦","武宁路","万里城","宜川路","中远两湾城","真光新村","真如","其他"];
//静安方向
var city6 = ["北京西路","曹家渡","静安寺","江宁路","南京西路","西康路","新闸路","其他"];
//卢湾方向
var city7 = ["打浦桥","复兴公园","淮海中路","鲁班路","世博滨江","五里桥","新天地","其他"];
//黄浦方向
var city8 = ["半淞园路","董家渡","黄浦滨江","老西门","南京东路","南外滩","蓬莱公园","人民广场","外滩","西藏南路","豫园","其他"];
//闸北方向
var city9 = ["宝山路","大宁路","共和新路","和田","老北站","彭浦","天目西路","汶水路","新客站","西藏北路","延长路","芷江西路","闸北公园","其他"];
//虹口方向
var city10 = ["北外滩","大柏树","广中路","和平公园","江湾","凉城","鲁迅公园","临平路","曲阳路","四川北路","四平路","提篮桥","周家嘴路","其他"];

//杨浦区名称
var city11 = ["鞍山","长白新村","长阳路","东外滩","复旦大学","黄兴","控江路","平凉路","四平路","五角场","新江湾城","新华医院","杨浦公园","杨浦大桥","中原","周家嘴路","其他"]; 
//宝山辖区名称
var city12 = ["大华","大场","东城区","顾村","共富","共康","高境","罗店","罗泾","庙行","上大","泗塘","淞南","淞宝","通河新村","通河西城区","吴淞","杨行","友谊路","月浦","张庙","其他"]; 
//嘉定辖区名称
var city13 = ["安亭","丰庄","黄渡","江桥","嘉定城区","嘉定镇","菊园新区","马陆","南翔","新城","真新新村","其他"]; 
//青浦辖区名称
var city14 = ["白鹤","青浦新城","青浦北部","徐泾","赵巷","朱家角","重固","其他"]; 
//松江
var city15 = ["洞泾","方松","九亭","莘闵","泗泾","佘山","松江大学城","松江新城","松江老城","松江工业区","松江科技园","新桥","岳阳","永丰","中山","其他"];
//金山
var city16 = ["漕泾","枫泾","金山新城","金山卫","金山中部","石化","亭林","朱泾"];
//奉贤
var city17 = ["奉城","海湾","海湾旅游区","金汇","南桥","西渡","庄行","柘林","其他"];
//南汇
var city18 = ["航头","惠南","康桥","临港新城","泥城","新场","周浦","祝桥","其他"];
//崇明
var city19 = ["堡镇","城桥","崇明","崇明新城","陈家镇","长兴岛","横沙岛","其他"];
//上海周
var city20 = ["嘉兴","昆山","苏州","杭州","宁波","其它"];

//全国省会，直辖市，自治区名称
var provinceName = ["浦东方向","闵行方向","徐汇方向","长宁方向","普陀方向","静安方向","卢湾方向","黄浦方向","闸北方向","虹口方向","杨浦方向","宝山方向","嘉定方向","青浦方向","松江方向","金山方向","奉贤方向","南汇方向","崇明方向","上海周边"]; 

function province() {

	var e = document.getElementById("province");
	for ( var i = 0; i < provinceName.length; i++)
		e.options.add(new Option(provinceName[i], provinceName[i]));
}
function cityName(n) {
	var e = document.getElementById("city");
	for ( var i = e.options.length; i > 0; i--)
		e.remove(i);
	if (n == 0)
		return;
	var a = eval("city" + n); // 得到城市的数组名
	for ( var i = 0; i < a.length; i++)
		e.options.add(new Option(a[i], a[i]));
}
function loadProvince() {
	province(); // 初始时给省名下拉菜单赋内容
}